<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.createStudyProgramTitle}"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.nameEn}:" for="studyProgramName" />
                    <h:inputText id="studyProgramName" value="#{studyProgramController.selected.studyProgramName}" title="#{bundle.nameEn}" required="true" requiredMessage="#{bundle.OBLIG}"/>
                    <h:outputLabel value="#{bundle.nameNo}:" for="studyProgramNameNo" />
                    <h:inputText id="studyProgramNameNo" value="#{studyProgramController.selected.studyProgramNameNo}" title="#{bundle.nameNo}" required="true" requiredMessage="#{bundle.OBLIG}"/>
                    <h:outputLabel value="#{bundle.approved}:" for="approved" />
                    <h:inputText id="approved" value="#{studyProgramController.selected.approved}" title="#{bundle.approved}" >
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.approvedBy}:" for="approvedBy" />
                    <h:inputText id="approvedBy" value="#{studyProgramController.selected.approvedBy}" title="#{bundle.approvedBy}" />
                    <h:outputLabel value="#{bundle.revised}:" for="revised" />
                    <h:inputText id="revised" value="#{studyProgramController.selected.revised}" title="#{bundle.revised}" >
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.revisedBy}:" for="revisedBy" />
                    <h:inputText id="revisedBy" value="#{studyProgramController.selected.revisedBy}" title="#{bundle.revisedBy}" />
                    <h:outputLabel value="#{bundle.nationalFramework}:" for="nationalFramework" />
                    <h:inputText id="nationalFramework" value="#{studyProgramController.selected.nationalFramework}" title="#{bundle.nationalFramework}" />
                    <h:outputLabel value="#{bundle.faculty}:" for="faculty" />
                    <h:selectOneMenu id="faculty" value="#{studyProgramController.selected.faculty}" title="#{bundle.faculty}" required="true" requiredMessage="#{bundle.OBLIG}">
                        <f:selectItems value="#{facultyController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{studyProgramController.create}" value="#{bundle.SAVE}" />
                <br />
                <br />
                <h:commandLink action="#{studyProgramController.prepareList}" value="#{bundle.SHOW_ALL}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
